<template>
    <div class="add">
        <van-search v-model="value" placeholder="请输入搜索关键词" @keydown.13="add" />
    </div>
</template>

<script>
export default {
    data() {
        return {
            value:'',
        }
    },
    methods: {
        add(){
            this.$store.commit('add',this.value);
            this.value = '';
        }
    },
}
</script>

<style>

</style>